package com.hehanpeng.springbootnetty;

import com.hehanpeng.springbootnetty.busi.busiservice.SpringBusiServiceManager;
import com.hehanpeng.springbootnetty.service.CibNettyBootstrap;
import com.hehanpeng.springbootnetty.service.SpringHandlerManager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class SpringBootNettyApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(SpringBootNettyApplication.class, args);
        SpringHandlerManager.register(context);
        SpringBusiServiceManager.register(context);
//        context.getBean(NettyBootstrap.class).start(10006);
        context.getBean(CibNettyBootstrap.class).start(10006);
    }
}
